home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 August
/
Ahoy_Magazine_85-08_1985_Double_L.d64
/
vic sawing wood
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
600b
|
23 lines
1 rem sound effects
2 rem sawing wood (vic version)
10 gosub 900:goto 100
20 poke fr(0),p(0):poke fr(1),0:poke fr(2),0:poke fr(3),20
30 poke vl,15:print "."
45 for i=0 to 5:poke vl,5:poke vl,15:for x=0 to int(3*rnd(9)):next:next
50 for i=15 to 0 step-1:poke vl,i:next
55 for i=1 to 15:poke vl,i:for x=0 to 2:next:next
60 for i=0 to 2:poke fr(i),0:next
90 return
99 rem routine to play sounds when shift is pressed
100 print "press shift";
110 if peek(653)=0 then 110
120 gosub 20:goto 100
898 rem routine to set up variables
899 rem set up sound control addresses
900 dim fr(3),p(127)
910 fr(0)=36874:for i=1 to 3:fr(i)=fr(i-1)+1:next
920 for i=0 to 127:p(i)=i+128:next
929 rem set volume address
930 vl=36878
990 return